/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package interfaces;

import Tables.database.OfflineMessage;
import Tables.database.Request;
import Tables.database.User;
import java.rmi.Remote;
import java.rmi.RemoteException;
import java.util.ArrayList;
import utilities.*;

/**
 *
 * @author Engy
 */
public interface ChatServerInt extends Remote {

    boolean checkServer() throws RemoteException;//btshoof el server online walla ofline

    boolean userLogin(String email, String password) throws RemoteException;//btshoof el user asln 3andy fel database walla l2

    /**
     * Checks if the user is already conected else where. (will sign the laready
     * signed in user out and logs in the requesting user) Checks if the user
     * even exsistes in the database. (return false) Match password(return false
     * if didn't match)
     */
    ArrayList<User> getContacts(String email) throws RemoteException;

    ArrayList<OfflineMessage> getOfflineMessages(String email) throws RemoteException;

    ArrayList<Request> getFriendRequests(String email) throws RemoteException;

    boolean AddFriend(Request request) throws RemoteException;

    boolean replyFriendRequsetToServer(Request request) throws RemoteException;

    void receiveFile(FilePacket packet) throws RemoteException;

    void notifyStatus(ArrayList<String> contactEmails, String userEmail, Utilities.Status status) throws RemoteException;

    void tellOthers(String msg) throws RemoteException;

    void register(ChatClientInt clientRef) throws RemoteException;

    void logout(ChatClientInt clientRef)  throws RemoteException;
/////////////////////////////////////////////////////////////////
    


/*
Note:
tellAnnouncment 
* */
// reciveAnnouncment, getAnnouncment (the same ????)
//tellOthers , notifyStatus
//    (the same 
//
//??)
}
